public class BaseClass {
    public int base;
    {
        System.out.println("父类的实例代码块");
    }
    static {
        System.out.println("父类的静态代码块");
    }
    public BaseClass() {
        System.out.println("父类的构造方法");
    }
}
class DerivedClass extends BaseClass{
    public int num1;
    public int num2;
    {
        System.out.println("子类的实例代码块");
    }
    static{
        System.out.println("子类的静态代码块");
    }
    public DerivedClass() {
        super();
        System.out.println("子类的构造方法");
    }

    public static void main(String[] args) {
        DerivedClass dc = new DerivedClass();
        System.out.println("===========================");
        DerivedClass dc2 = new DerivedClass();
    }
}
